import request from '@/utils/request'

export function getSubList(pageSize, pageNum){
    return request({
        url: '/sub/list?pageSize=' + pageSize + '&pageNum=' + pageNum,
        method: 'get',
    })
}


export function getColList(pageSize, pageNum){
    return request({
        url: '/col/list?pageSize=' + pageSize + '&pageNum=' + pageNum,
        method: 'get',
    })
}

export function getTaskList(pageSize, pageNum, status){
    return request({
        url: '/task/list?pageSize=' + pageSize + '&pageNum=' + pageNum + '&status=' + status,
        method: 'get',
    })
}

export function getTask(tid){
    return request({
        url: '/task/getTask?id=' + tid,
        method: 'get',
    })
}

export function getSlist(params){
    return request({
        url: '/task/slist',
        method: 'get',
        params: params
    })
}

export function getDlist(params){
    return request({
        url: '/task/dlist',
        method: 'get',
        params: params
    })
}

export function changeTaskName(tid, title){
    return request({
        url: '/task/changeTaskName?tid=' + tid + '&title=' + title,
        method: 'get',
    })
}

export function changeDate(tid, date){
    return request({
        url: '/task/changeDate?id=' + tid + '&date=' + date,
        method: 'get',
    })
}

export function start(tid, date){
    return request({
        url: '/task/start?tid=' + tid + '&date=' + date,
        method: 'get',
    })
}

export function pause(tid){
    return request({
        url: '/task/pause?tid=' + tid,
        method: 'get',
    })
}

